package com.siam.package_weixin_pay.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(value = "wxpay")
public class WxPayConfig {

    private String appId;

    // 商户号，是由微信支付系统生成并分配给每个商户的唯一标识符，商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756
    private String mchId;

    private String mchKey;

    private String notifyUrl;

    private String signType;

    private String tradeType;

    private String payUrl;

    private String refundUrl;

    private String refundSuccessNotifyUrl;

    private String payToBalanceUrl;

    private String payToBalanceV3Url;

    private String payToBalanceV3NotifyUrl;

    // 商户API证书序列号，如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053
    private String certificateSerialNo;

    // 商户API证书私钥文件路径，本地文件路径
    private String privateKeyFilePath;

    // 微信支付公钥ID，如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816
    private String wechatPayPublicKeyId;

    // 微信支付公钥文件路径，本地文件路径
    private String wechatPayPublicKeyFilePath;

    // APIv3密钥
    private String apiV3Key;
}